#ifndef MY_LEVEL_INFO_H
#define MY_LEVEL_INFO_H



#define BTN_GAME_START		50



class LevelInfo : public CScene
{
public:
	LevelInfo( CScene** ppScene, CScene* pPerScene, DWORD dwLevel )
	{
		m_ppScene		= ppScene;
		m_pPerScene		= pPerScene;
		m_bLogicStart	= false;
		m_dwLevel		= dwLevel;

	}

	void InitScene()
	{
		g_CResource.PlaySound( SOUND_PANEL );

		m_sprBackGround.CreateScript( SPR_TYPE_DEFAULT_CB, 240, 598 );
		m_sprBackGround.AddObject( CREATE_IMAGE_PKG_KEY( 5, 1, m_dwLevel ) );

		m_mapSprObj[BTN_GAME_START].CreateScript( SPR_TYPE_DEFAULT_CB, 240, 585 );
		m_mapSprObj[BTN_GAME_START].AddObject( CREATE_IMAGE_PKG_KEY( 1, 2, 0 ) );

		g_CInputData.AddInputObject( BTN_GAME_START, m_mapSprObj[BTN_GAME_START].GetScriptRect() );

	}

	inline
	void RenderScene()
	{
		m_pPerScene->RenderScene();
		m_sprBackGround.RenderScript();
		m_mapSprObj[BTN_GAME_START].RenderScript();

	}

	inline
	void RunLogic()
	{
		if( g_CInputData.m_mapInputObject[BTN_GAME_START].m_nState == BTN_STATE_UP )
		{
			g_CResource.PlaySound( SOUND_PUSH );

			m_pPerScene->StartLogic();

			*m_ppScene = m_pPerScene;

			delete this;
			return ;

		}

	}

	inline
	void StartLogic()
	{
		CScene::StartLogic();
		m_pPerScene->StopLogic();

	}

protected:
	DWORD		m_dwLevel;

};



#endif